Skip to content

<fix>[identity]: fix ZCF-3527 account resource ref cleanup#3997

Open
ZStack-Robot wants to merge 1 commit into
feature-5.5.22-zcf-temporaryfrom
sync/hanyu.liang/fix-3527@@2
Open

<fix>[identity]: fix ZCF-3527 account resource ref cleanup#3997
ZStack-Robot wants to merge 1 commit into
feature-5.5.22-zcf-temporaryfrom
sync/hanyu.liang/fix-3527@@2

Conversation

@ZStack-Robot
Copy link
Copy Markdown
Collaborator

sync from gitlab !9890

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)

Review profile: CHILL

Plan: Pro

Run ID: 1e69c9c4-88c7-4a4c-b8b1-c5edce011864

📥 Commits

Reviewing files that changed from the base of the PR and between ad4a1b6 and 2d15cd8.

📒 Files selected for processing (1)
  • identity/src/main/java/org/zstack/identity/AccountManagerImpl.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • identity/src/main/java/org/zstack/identity/AccountManagerImpl.java

Walkthrough

修正 AccountManagerImpl.postSoftDelete 中删除 AccountResourceRefVO 的 resourceType 计算:由 concrete 类名改为通过 ResourceTypeMetadata 反查并使用 base resource type 的 simpleName 作为查询绑定参数。

变更

AccountResourceRef 软删除修复

层级 / 文件 摘要
Base resource type 查询修复
identity/src/main/java/org/zstack/identity/AccountManagerImpl.java
postSoftDelete 中删除 AccountResourceRefVO 时,resourceType 查询参数从 entityClass.getSimpleName() 改为 ResourceTypeMetadata.getBaseResourceTypeFromConcreteType(entityClass).getSimpleName(),确保在资源类型继承结构中的正确匹配。

代码审查工作量

🎯 2 (Simple) | ⏱️ ~8 minutes

诗歌

🐰 细微的类型转换,
Base 与 Concrete 间的对话,
资源引用找到真身,
软删除不再迷茫——
简单改动,深层修复!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Pull request title follows the required [scope]: format and is 58 characters, well within the 72 character limit.
Description check ✅ Passed Pull request description relates to the changeset by indicating it syncs from a GitLab merge request that fixes account resource reference cleanup.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/hanyu.liang/fix-3527@@2

Comment @coderabbitai help to get the list of available commands and usage tips.

@MatheMatrix MatheMatrix force-pushed the sync/hanyu.liang/fix-3527@@2 branch from d2d0e5e to ad4a1b6 Compare May 16, 2026 04:21
Use the base resource type when deleting account resource refs for soft-deleted concrete resources.

Resolves: ZCF-3527

Change-Id: Ida39a3ee5e6b4b0d3255bfef95601890afd80709
@MatheMatrix MatheMatrix force-pushed the sync/hanyu.liang/fix-3527@@2 branch from ad4a1b6 to 2d15cd8 Compare May 16, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants